import Vue from 'vue'
import App from './App'

import store from './store'
//把vuex定义成全局组件
Vue.prototype.$store = store


import uView from 'uview-ui'
Vue.use(uView);
Vue.config.productionTip = false

import http from './utils/https.js'
import result from './utils/result.js'
import interfaces from './utils/interfaces.js'
import validate from './utils/validate.js'

Vue.prototype.request = http
Vue.prototype.result = result
Vue.prototype.interfaces = interfaces
Vue.prototype.validate = validate


import * as custom from './utils/custom.js'
Object.keys(custom).forEach(key => {
	Vue.filter(key, custom[key])
})


// 全局注册组件

import loadingText from './components/loadingText.vue'
import empt from './components/empt.vue'
import status from './components/status.vue'
Vue.component('loading-text', loadingText)
Vue.component('empt', empt)
Vue.component('page-status', status)
App.mpType = 'app'

//console.log(uni.getSystemInfoSync().platform)


const app = new Vue({
	...App,
	store
})
app.$mount()
